package com.zzx.boot.controller;

import com.zzx.boot.entity.table.User;
import com.zzx.boot.utils.R;
import com.zzx.boot.utils.RedisUtils;
import lombok.RequiredArgsConstructor;
import org.junit.jupiter.params.shadow.com.univocity.parsers.annotations.Validate;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author tan
 * @version 1.0
 * @date 2023/7/6 21:53
 */
@RestController
@RequiredArgsConstructor
public class TestController {

    private final RedisUtils redisUtils;


    @RequestMapping("/test")
    public R test( User user){
        redisUtils.setString("tb_user",new User(13L,"昵称","pic","123","18707505659","123","123",1));
        return R.success(redisUtils.getString("tb_user",User.class));
    }



}
